package com.zs.games.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@ApiModel(description = "用户动态")
@Data
@TableName("user_dynamic")
public class UserDynamic {

    @ApiModelProperty(value = "动态ID")
    @TableId(type =  IdType.AUTO, value = "dynamic_id")
    private int dynamicId;

    @ApiModelProperty(value = "用户ID")
    private int userId;

    @ApiModelProperty(value = "用户昵称")
    private String nickName;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "图片地址，多个以逗号分隔")
    private String images;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    public UserDynamic(){

    }

    public UserDynamic(int userId, String nickName, String content, String images) {
        this.userId = userId;
        this.nickName = nickName;
        this.content = content;
        this.images = images;
        this.createTime = new Date();
    }
    // Getters and Setters for the above fields
}
